1. Field of the Invention
The present invention generally relates to image processors, and more particularly, to an image processor that processes images in JPEG XR format.
2. Description of the Background Art
An image processor that processes an image in JPEG XR (or HD Photo) format is disclosed in, for example, JP2009-232217A. The image processor includes an encoder and a decoder. The encoder includes a color conversion unit, a frequency transform unit, a quantization unit, a prediction unit, an encoding unit, and the like. The decoder includes a decoding unit, an inverse prediction unit, a dequantization unit, a frequency inverse transform unit, a color inverse conversion unit, and the like.
Streaming modes in JPEG XR include two modes, namely, a spatial mode and a frequency mode. In the spatial mode, a stream of one image is configured such that data of each macroblock within one image is sequentially arranged. In the frequency mode, a stream of one image is configured such that a stream of data of direct-current component of all macroblocks in one image, a stream of data of low-frequency component of all macroblocks in one image, a stream of upper (or more significant) data (NORMAL DATA) of high-frequency component of all macroblocks in one image, and a stream of lower (or less significant) data (FLEXBITS) of high-frequency component of all macroblocks in one image are sequentially arranged.
Since encoding in JPEG XR is performed macroblock by macroblock, a stream in the spatial mode is easily generated with hardware. In contrast, generating a stream in the frequency mode with hardware requires the first processing on an image to generate a stream of data of direct-current component of all macroblocks in the image, the second processing on the same image to generate a data stream of data of low-frequency component of all macroblocks in the image, the third processing on the same image to generate a stream of upper data of high-frequency component of all macroblocks in the image, and then the fourth processing on the same image to generate a stream of lower data of high-frequency component of all macroblocks in the image. In this way, processing on the same image needs to be repeated four times, which causes a problem that time required for processing is increased.